import request from '@/utils/request'

// 获取公告列表
export const announcementGetAnnouncementListService = () => {
  return request.get<Api.Announcement.AnnouncementListResponse>('/announcement/getAnnouncementList/')
}

// 发布公告
export const announcementPostAnnouncementService = (data: Api.Announcement.PostAnnouncementParams) => {
  return request.post<Api.Announcement.AnnouncementListResponse>('/announcement/postAnnouncement/', data)
}

// 删除公告
export const announcementDeleteAnnouncementService = (id: number) => {
  return request.delete<Api.Announcement.AnnouncementListResponse>(`/announcement/deleteAnnouncement/?id=${id}`)
}
